<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="format-detection" content="telephone=no">
    <meta name="viewport" content="initial-scale=1.0, maximum-scale=1, user-scalable=no,width=device-width,height=device-height"
    />
    <link rel="stylesheet" href="css/reset.css">
    <link rel="stylesheet" href="mui/mui.min.css">
    <link rel="stylesheet" href="mui/mui.showLoading.css">
    <link rel="stylesheet" href="css/guidepage.css?20180821">
    <link rel="stylesheet" href="swiper/swiper.min.css">
    <link rel="stylesheet" href="css/animate.css">
    <script src="js/flexible.js"></script>
    <title>CHECK IN 下一秒惊喜</title>
</head>

<body>
    <div id="app" class="app">
        <div class="top_logo">
            <img src="img/right_logo.png?20180821" alt="">
        </div>
        <div class="my_slider">
            <div class="swiper-container">
                <div class="swiper-wrapper">
                    <div class="swiper-slide">
                        <img data-src="img/slide4.jpg" class="swiper-lazy">
                        <div class="swiper-lazy-preloader"></div>
                    </div>
                    <div class="swiper-slide">
                        <img data-src="img/slide5.jpg" class="swiper-lazy">
                        <div class="swiper-lazy-preloader"></div>
                    </div>
                    <div class="swiper-slide">
                        <img data-src="img/slide6.jpg" class="swiper-lazy">
                        <div class="swiper-lazy-preloader"></div>
                    </div>
                </div>
                <div class="swiper-pagination"></div>
            </div>
        </div>

        <div class="text">长荣航空是否获得“全球十佳航空公司”殊荣？</div>
        <div class="radio">
            <ul>
                <li>
                    <div class="checkbox1">
                        <input type="radio" id="checkbox1" checked v-model="picked" value="是" name="test" class="check">
                        <label for="checkbox1" style="min-width: 16px;"></label>
                    </div>
                    <span class="p16" style="margin-left: 16px;">是</span>
                </li>
                <li>
                    <div class="checkbox1">
                        <input type="radio" id="checkbox2" value="否" v-model="picked" name="test" class="check">
                        <label for="checkbox1" style="min-width: 16px;"></label>
                    </div>
                    <span class="p16" style="margin-left: 16px;">否</span>
                </li>
            </ul>
        </div>
        <div class="btn" @click='joinactive'>参加活动</div>
    </div>
    </div>
    <script src="swiper/swiper.min.js"></script>
    <script src="mui/mui.min.js"></script>
    <script src="mui/mui.showLoading.js"></script>
    <script src="https://cdn.bootcss.com/vue/2.2.2/vue.min.js"></script>
    <script src="https://cdn.bootcss.com/axios/0.18.0/axios.min.js"></script>
    <script src="js/config.js"></script>
</body>
<script>
    var url = appconfig.apiUrl;
    let vm = new Vue({
        el: "#app",
        data: {
            phone: '',
            picked: '是',
            theRequest: ''

        },
        methods: {
            getUrl: function () {
                var theRequest = {};
                var url = decodeURIComponent(location.search); //获取url中"?"符后的字串
                if (url.indexOf("?") != -1) {
                    var str = url.substr(1);
                    var strs = str.split("&");
                    for (var i = 0; i < strs.length; i++) {
                        theRequest[strs[i].split("=")[0]] = unescape(strs[i].split("=")[1]);
                    }
                }
                return theRequest;
            },
            joinactive() {
                console.log(this.picked);
                if (this.picked == "是") {
                    window.location.href = "play.html?id=" + this.theRequest.id + "&t=" + new Date().getTime();
                }
            },
            autoPlayAudio() {
                wx.config({
                    // 配置信息, 即使不正确也能使用 wx.ready
                    debug: false,
                    appId: '',
                    timestamp: 1,
                    nonceStr: '',
                    signature: '',
                    jsApiList: []
                });
                wx.ready(function () {
                    document.querySelector('audio').play();
                });
            }
        },
        mounted() {
            this.theRequest = this.getUrl();
            var mySwiper = new Swiper('.swiper-container', {
                pagination: {
                    el: '.swiper-pagination',
                },
                autoplay: {
                    delay: 2000,
                    stopOnLastSlide: false,
                    disableOnInteraction: false,
                },
                lazy: {
                    loadPrevNext: true,
                },
                loop: true
            })
        }
    })
</script>

</html>